package com.ffws.H08.api;

import com.ffws.H08.model.po.H08FireData;
import com.ffws.H08.service.H08FireDataService;
import com.ffws.base.model.RestResponse;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author JC
 * @description TODO
 * @Date 2023-10-7 21:28
 * @Version 1.0
 */
@Api(value = "请求葵花八号卫星接口", tags = "请求葵花八号卫星接口")
@RestController
public class H08Controller {

    @Autowired
    private H08FireDataService h08FireDataService;

    @ApiOperation("获取H08卫星上的野火数据")
    @GetMapping(value = "/getData")
    public RestResponse<List<H08FireData>> getH08Data() {
        return h08FireDataService.getH08DataForMongo();
    }

    @RequestMapping(value = "/test")
    public RestResponse<String> getTest(String text) {
        return RestResponse.success("测试成功: text = " + text);
    }

}
